package com.esyoga.yoyoga.handler;

import com.esyoga.yoyoga.pojo.TTrainer;
import com.esyoga.yoyoga.service.CoachWalletService;
import lombok.Data;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Data
@Controller
@RequestMapping("/CoachWallet")
public class CoachWalletHandler {

        @Resource
        private CoachWalletService coachWalletService;

    @RequestMapping("/showBalance")
    @ResponseBody
    public List<TTrainer> showBalance(Integer tId){
        return coachWalletService.showBalance(tId);
    }
}
